package com.zy.explore.db.infrastructure.plugins.multidbsupport.plugin;

import com.zy.explore.db.infrastructure.plugins.util.SqlPrintUtil;
import org.apache.ibatis.plugin.Interceptor;
import org.apache.ibatis.plugin.Invocation;

import java.util.Properties;

/**
 * <p>建类说明：oracle数据库sql拦截修改器</p>
 *
 * @author 中国印
 * @date 2022年02月17日 16:34:47
 */
public class OracleSqlChangeInterceptor implements Interceptor {

    @Override
    public Object intercept(Invocation invocation) throws Throwable {
        // 打印sql和执行时间
        return SqlPrintUtil.printNonQuerySql(invocation);
    }

    @Override
    public Object plugin(Object target) {
        return Interceptor.super.plugin(target);
    }

    @Override
    public void setProperties(Properties properties) {
        Interceptor.super.setProperties(properties);
    }
}
